#include <stdio.h>
#include "../../input.h"
#include "../../output.h"
#define size 8
void QuicklySort(int a[],int low,int high){
	int base = a[low];
	int i = low;
	int j = high;
	if (low >= high)  //如果low >= high说明排序结束了
	{
		return ;
	}
	while (low < high) {
		while (low < high && a[high] >= base) {
			high--;
		}
		if(a[high] < base){
			a[low] = a[high];
		}
		while (low < high && a[low] <= base) {
			low++;
		}
		if(a[low] > base){
			a[high] = a[low];
		}
	}
	a[low] = base;
	QuicklySort(a, i,low-1);
	QuicklySort(a,low+1,j);
}
int main(int argc, char *argv[]) {
	int a[size];
	input(a, size);
	QuicklySort(a,0,size - 1);
	output(a, size);
}